﻿using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc;
using YAPACS.RisServer.Abstractions;

namespace YAPACS.RisServer.Controllers;
[Authorize]
[ApiController]
public class ReportStyleController : AbpControllerBase
{
    private readonly IReportService _reportService;
    private readonly IReportStyleService _reportStyleService;

    public ReportStyleController(IReportService reportService,IReportStyleService reportStyleService)
    {
        _reportService = reportService;
        _reportStyleService = reportStyleService;
    }
    [HttpGet("/api/get-print-options")]
    public async Task<IActionResult> GetPrintOptionsAsync()
    {
        var result = await _reportStyleService.GetPrintOptionsAsync();
        return Ok(result);
    }

    [HttpGet("api/get-{reportId}-report-styles")]
    public async Task<IActionResult> GetReportStylesAsync(Guid reportId)
    {
        var result = await _reportStyleService.GetReportStylesAsync(reportId);
        return Ok(result);
    }
    [HttpGet("api/get-report-style-{reportStyleId}")]
    public async Task<IActionResult> GetReportStyleAsync(Guid reportStyleId)
    {
        var result = await _reportStyleService.GetReportStyleAsync(reportStyleId);
        return Ok(result);
    }
}
